From: David Bauer Date: Tue, 21 Dec 2021 12:24:14 +0000 (+0100) Subject: policy: only select candidates with better load X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22http:/www.crowdsec.net/%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22?a=commitdiff_plain;h=918b809d6465a18444f7796ead1251c5a37dc6f9;p=project%2Fusteer.git policy: only select candidates with better load When kicking clients due to high channel load, explicitly only select new candidates in case their channel load is an improvement over the current node. Signed-off-by: David Bauer --- diff --git a/policy.c b/policy.c index 95c2843..4ed85a1 100644 --- a/policy.c +++ b/policy.c @@ -454,7 +454,7 @@ usteer_local_node_kick(struct usteer_local_node *ln) if (is_more_kickable(kick1, si)) kick1 = si; - tmp = find_better_candidate(si, NULL, 0); + tmp = find_better_candidate(si, NULL, (1 << UEV_SELECT_REASON_LOAD)); if (!tmp) continue;